//
//  Person.m
//  T98
//
//  Created by huazi on 14/11/2.
//  Copyright (c) 2014年 T98. All rights reserved.
//

#import "Person.h"

@implementation Person
+(instancetype)sharePerson
{
    static Person *_person =nil;
    static dispatch_once_t predicate;
    dispatch_once(&predicate, ^{
        _person =[[Person alloc] init];
    });
    return _person;
}
- (id)init
{
    if (self =[super init])
    {
        
    }
    return self;
}
- (void)initDataWithDic:(NSDictionary *)dic
{
//    if ([self.loginType isEqualToString:kLoginTypeuser])
//    {
//        self.account =[NSString isEmpty:[dic objectForKey:@"account"]]?@"":[dic objectForKey:@"account"];
//        self.agencyName =[NSString isEmpty:[dic objectForKey:@"agencyName"]]?@"":[dic objectForKey:@"agencyName"];
//        self.agencyOrder =[NSString isEmpty:[dic objectForKey:@"agencyOrder"]]?@"":[dic objectForKey:@"agencyOrder"];
//        self.backDepositFee =[NSString isEmpty:[dic objectForKey:@"backDepositFee"]]?@"":[dic objectForKey:@"backDepositFee"];
//        self.breachDesc =[NSString isEmpty:[dic objectForKey:@"breachDesc"]]?@"":[dic objectForKey:@"breachDesc"];
//        self.clearingDesc =[NSString isEmpty:[dic objectForKey:@"clearingDesc"]]?@"":[dic objectForKey:@"clearingDesc"];
//        self.clearingEndDate =[NSString isEmpty:[dic objectForKey:@"clearingEndDate"]]?@"":[dic objectForKey:@"clearingEndDate"];
//        self.clearingStaffId =[NSString isEmpty:[dic objectForKey:@"clearingStaffId"]]?@"":[dic objectForKey:@"clearingStaffId"];
//        self.clearingStartDate =[NSString isEmpty:[dic objectForKey:@"clearingStartDate"]]?@"":[dic objectForKey:@"clearingStartDate"];
//        self.createTime =[NSString isEmpty:[dic objectForKey:@"createTime"]]?@"":[dic objectForKey:@"createTime"];
//        self.userId =[NSString isEmpty:[NSString stringWithFormat:@"%@",[dic objectForKey:@"id"]]]?@"":[NSString stringWithFormat:@"%@",[dic objectForKey:@"id"]];
//        self.leaveDate =[NSString isEmpty:[dic objectForKey:@"leaveDate"]]?@"":[dic objectForKey:@"leaveDate"];
//        self.leaveDesc =[NSString isEmpty:[dic objectForKey:@"leaveDesc"]]?@"":[dic objectForKey:@"leaveDesc"];
//        self.leaveStaffId =[NSString isEmpty:[dic objectForKey:@"leaveStaffId"]]?@"":[dic objectForKey:@"leaveStaffId"];
//    self.leaveType =[NSString isEmpty:[dic objectForKey:@"leaveType"]]?@"":[dic objectForKey:@"leaveType"];
//    self.outerId =[NSString isEmpty:[dic objectForKey:@"outerId"]]?@"":[dic objectForKey:@"outerId"];
//    self.outerUserId =[NSString isEmpty:[dic objectForKey:@"outerUserId"]]?@"":[dic objectForKey:@"outerUserId"];
//    self.pwd =[NSString isEmpty:[dic objectForKey:@"pwd"]]?@"":[NSString stringWithFormat:@"%@",[dic objectForKey:@"pwd"]];
//    self.remark =[NSString isEmpty:[dic objectForKey:@"remark"]]?@"":[dic objectForKey:@"remark"];
//    self.settlementDate =[NSString isEmpty:[dic objectForKey:@"settlementDate"]]?@"":[dic objectForKey:@"settlementDate"];
//    self.settlementDesc =[NSString isEmpty:[dic objectForKey:@"settlementDesc"]]?@"":[dic objectForKey:@"settlementDesc"];
//    self.settlementStaffId =[NSString isEmpty:[dic objectForKey:@"settlementStaffId"]]?@"":[dic objectForKey:@"settlementStaffId"];
//    self.state =[NSString isEmpty:[dic objectForKey:@"state"]]?@"":[dic objectForKey:@"state"];
//    self.status =[NSString isEmpty:[dic objectForKey:@"status"]]?@"":[dic objectForKey:@"status"];
//    self.totalDepositFee =[NSString isEmpty:[dic objectForKey:@"totalDepositFee"]]?@"":[NSString stringWithFormat:@"%@",[dic objectForKey:@"totalDepositFee"]];
//    self.updateTime =[NSString isEmpty:[dic objectForKey:@"updateTime"]]?@"":[dic objectForKey:@"updateTime"];
//    self.userName =[NSString isEmpty:[dic objectForKey:@"userName"]]?@"":[dic objectForKey:@"userName"];
//    self.userPhone =[NSString isEmpty:[dic objectForKey:@"userPhone"]]?@"":[dic objectForKey:@"userPhone"];
    
//    }
//    else if([self.loginType isEqualToString:kLoginTypedoctor])
//    {
        self.isLogin =YES;
        self.userId =[NSString isEmpty:[dic objectForKey:@"userId"]]?@"":[dic objectForKey:@"userId"];
        self.userName =[NSString isEmpty:[dic objectForKey:@"userName"]]?@"":[dic objectForKey:@"userName"];
        self.userPic =[NSString isEmpty:[dic objectForKey:@"userPic"]]?@"":[dic objectForKey:@"userPic"];
        self.userPhone =[NSString isEmpty:[dic objectForKey:@"userPhone"]]?@"":[dic objectForKey:@"userPhone"];
        self.sex =[NSString isEmpty:[dic objectForKey:@"sex"]]?@"":[dic objectForKey:@"sex"];
        self.province =[NSString isEmpty:[dic objectForKey:@"province"]]?@"":[dic objectForKey:@"province"];
        self.city =[NSString isEmpty:[dic objectForKey:@"city"]]?@"":[dic objectForKey:@"city"];
        self.area =[NSString isEmpty:[dic objectForKey:@"area"]]?@"":[dic objectForKey:@"area"];
        self.userDesc =[NSString isEmpty:[dic objectForKey:@"userDesc"]]?@"":[dic objectForKey:@"userDesc"];
        self.companyName =[NSString isEmpty:[dic objectForKey:@"companyName"]]?@"":[dic objectForKey:@"companyName"];
//        self.ordersCount =[NSString isEmpty:[dic objectForKey:@"ordersCount"]]?@"":[dic objectForKey:@"ordersCount"];
//        self.tabsId =[NSString isEmpty:[dic objectForKey:@"tabsId"]]?@"":[dic objectForKey:@"tabsId"];
//        self.tabsName =[NSString isEmpty:[dic objectForKey:@"tabsName"]]?@"":[dic objectForKey:@"tabsName"];
//        self.isNewUser =[NSString isEmpty:[dic objectForKey:@"isNewUser"]]?@"":[dic objectForKey:@"isNewUser"];
//        self.hospital =[NSString isEmpty:[dic objectForKey:@"hospital"]]?@"":[dic objectForKey:@"hospital"];
//        self.level =[NSString isEmpty:[dic objectForKey:@"level"]]?@"":[dic objectForKey:@"level"];
//        self.realStatus =[NSString isEmpty:[dic objectForKey:@"realStatus"]]?@"":[dic objectForKey:@"realStatus"];
//    }
//    else
//    {
//    
//    }
}
@end
